package cn.ibdsr.human.config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Configuration;

/**
 * 对filter进行配置
 * @author chenglx
 * @version V1.0
 * @createDate 2020/11/12 17:03
 * <p>
 * Date Author Description
 * ------------------------------------------------------
 * 2020/3/20 chenglx init
 */
@Configuration
@Slf4j
public class FilterConfiguration {

    // todo
//    @Autowired
//    private UserAuthenticationFilter userAuthenticationFilter;

//    @Bean
//    public FilterRegistrationBean registerAuthFilter() {
//        FilterRegistrationBean registration = new FilterRegistrationBean();
//        registration.setFilter(this.userAuthenticationFilter);
//        // 设置对哪些url进行处理
//        registration.addUrlPatterns("/*");
//        registration.setName("userAuthenticationFilter");
//        // 值越小，Filter越靠前
//        registration.setOrder(1);
//        return registration;
//    }

    // 如果有多个Filter，再写一个public FilterRegistrationBean registerOtherFilter(){...}即可
}
